#include <iostream>
#include "MyString.h"

using namespace std;

int main() {

    MyString string1;
//    MyString string2(NULL);
    MyString string3 = "从前有座山,山里有个庙";

    MyString srcString = "12345";
    MyString string4 = srcString;

    string4 = "78964123";

    string4 = string3;

    cout << "Hello, World!" << endl;

    MyString string5 = "852147";
    MyString string6 = "852147";
    cout << "address string5:string6  -> " << &string5 << " : " << &string6 << endl;

    if (string5 == string6) {
        cout << "string5 等于 string6" << endl;
    } else {
        cout << "string5 不等于 string6" << endl;
    }

    if (string5 == "852147") {
        cout << "string5 等于 852147" << endl;
    } else {
        cout << "string5 不等于 852147" << endl;
    }

    MyString string7 = "987654";
    MyString string8 = "987654";

    if (string7 != string8) {

        cout << "string7:"<<  string7 << "不等于" << " string8:" << string8 << endl;
    } else {

        cout << "string7:"<<  string7 << "等于" << " string8:"<<  string8 << endl;
    }
    if (string7 != "123456") {

        cout << "string7:"<<  string7 << "不等于" << " 123456" << endl;
    } else {

        cout << "string7:"<<  string7 << "等于" << " 123456" << endl;
    }
    if (string7 != "987654") {

        cout << "string7:"<<  string7 << "不等于" << " 987654" << endl;
    } else {

        cout << "string7:"<<  string7 << "等于" << " 987564" << endl;
    }

    MyString string9;
    cin >> string9;
    cout << endl;
    cout << "输入的字符串:" << string9 << endl;




    return 0;
}